          <?php $errorConclusion = Yii::app()->user->hasFlash('errorConclusion') ? unserialize(Yii::app()->user->getFlash('errorConclusion')) : null ?>
          <!-- START OF MAINCOL -->
          <div class="MainCol AddEbookPage">
          	  <h1>编辑心理测试结论</h1>
              <span class="NormalFont SmallFont">
                  <?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?> > 心理测试管理 > 编辑心理测试主题 > 编辑心理测试结论
               </span><br /><br />
              <div class="Titlebox box"><!-- DON'T DELETE --></div>

              <?php if(Yii::app()->user->hasFlash('successMessage')) : ?>
              <div class="SuccessfulBox Smallbox">
                <span class="Successful"> <?php echo Yii::app()->user->getFlash('successMessage'); ?></span>
              </div>
              <?php endif; ?>

	            <?php if($errorConclusion !== null) : ?>
	            <?php echo CHtml::errorSummary($errorConclusion) ?>
	            <?php endif ?>

              <?php echo CHtml::form(array('/admin/psytest/updateconclusion')) ?>
              <?php echo CHtml::activeHiddenField($conclusion, 'conclusionId') ?>
                <?php if($conclusion->topic->getTypeCatalog() == 'mark') : ?>
              <div class="Smallbox"><label>维度置位符</label>
              <table>
              <?php foreach($conclusion->topic->dimens as $dim) : ?>
                <tr><td><?php echo $dim->dimensDescr ?>：</td><td><?php echo $dim->getReplacer() ?></td></tr>
              <?php endforeach ?>
              <?php foreach($conclusion->topic->secDims as $secDim) : ?>
              	<tr><td>*<?php echo $secDim->dimDescr ?>：</td><td><?php echo $secDim->getReplacer() ?></td></tr>
              <?php endforeach ?>
            </table>
              </div>
              <?php if($conclusion->topic->hasSecDim) : ?><div class="Smallbox"><label>&nbsp;</label>（带“*”号的为二次维度的置位符）</div><?php endif ?>
              <?php endif ?>
              <div class="Smallbox"><label>结论序号</label>
                  <?php echo CHtml::activeTextfield($conclusion, 'conclusionOrder', array('class' => 'TxtInput', 'style' => 'width: 48px')) ?>
                  <?php echo CHtml::link('&nbsp;', array('/admin/psytest/deleteconclusion', 'id' => $conclusion->conclusionId), array('style' => 'float: right;', 'class' => 'Delete', 'confirm' => '确定要删除该结论吗？')) ?>
              </div>

                <?php if($conclusion->isNeedFormula()) : ?>
              <div class="Smallbox"><label>公式<span class="Red">*</span></label>
              <?php echo CHtml::activeTextfield($conclusion, 'formula', array('class' => 'TxtInput', 'style' => 'width: 340px')) ?>
              </div>
              <?php endif ?>

              <div class="Smallbox"><label>结论概括<span class="Red">*</span></label>
              <?php echo CHtml::activeTextfield($conclusion, 'conclusionSum', array('class' => 'TxtInput', 'style' => 'width: 340px')) ?>
              </div>
              
              <div class="Smallbox"><label>结论描述<span class="Red">*</span></label>
                <?php $this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
                    "model"=>$conclusion,				# Data-Model
                    "attribute"=>'conclusionDescr',			# Attribute in the Data-Model
                    "height"=>'300px',
                    "width"=>'100%',
                    "toolbarSet"=>'Basic', 			# EXISTING(!) Toolbar (see: fckeditor.js)
                    "fckeditor"=>Yii::app()->basePath."/../assets/fckeditor/fckeditor.php",
                                                    # Path to fckeditor.php
                    "fckBasePath"=>Yii::app()->baseUrl."/assets/fckeditor/",
                                                    # Realtive Path to the Editor (from Web-Root)
                    "config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/common.css',),
                                                    # Additional Parameter (Can't configure a Toolbar dynamicly)
                ) ); ?>
                <?php //echo CHtml::activeTextarea($conclusion, 'conclusionDescr', array('style' => 'height: 180px')) ?>
              </div>
              
              <div class="Smallbox"><label>&nbsp;</label>
              	<span class="">&nbsp;</span>
              </div>

              <div class="Smallbox btnBox"><label>&nbsp;</label>
              <?= CHtml::submitButton('提交'); ?>
              </div>

              <?php echo CHtml::endForm() ?>
              <div class="Smallbox btnBox"><label>&nbsp;</label>
              <?= CHtml::link('返回', array('admin/psytest/editconclusions', 'id' => $conclusion->topicId)); ?>
              </div>
          </div>
          <!-- END OF MAINCOL -->
